package cn.qiyu5522.tk_ems.entity.dto;

import cn.qiyu5522.tk_ems.entity.Company;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.time.LocalDateTime;

/**
 * @ProjectName: tk_ems
 * @Package: cn.qiyu5522.tk_ems.entity.dto
 * @ClassName: CompanyDTO
 * @Author: [Toneky]
 * @Date: 2023/2/19 18:01
 * @Version: V1.0
 **/
@ApiModel("企业DTO对象")
@Data
public class CompanyDTO {

    @ApiModelProperty(value = "企业编号")
    @NotNull(message ="企业编号不能为空",groups = {Company.Update.class,Company.Delete.class})
    private Long id;

    @ApiModelProperty(value = "企业名称")
    @NotBlank(message ="企业名称不能为空",groups = {Company.Update.class,Company.Insert.class})
    private String name;

    @ApiModelProperty(value = "企业代号")
    @NotNull(message ="企业代号不能为空",groups = {Company.Update.class,Company.Insert.class})
    private Long code;

    @ApiModelProperty(value = "企业介绍")
    @NotBlank(message ="企业描述不能为空",groups = {Company.Update.class,Company.Insert.class})
    private String description;

    @ApiModelProperty(value = "地址")
    @NotBlank(message ="企业地址不能为空",groups = {Company.Update.class,Company.Insert.class})
    private String address;

    @ApiModelProperty(value = "联系电话")
    @NotBlank(message ="企业电话不能为空",groups = {Company.Update.class,Company.Insert.class})
    private String phone;

    @ApiModelProperty(value = "邮箱")
    @NotBlank(message ="企业邮箱不能为空",groups = {Company.Update.class,Company.Insert.class})
    @Pattern(regexp = "^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(.[a-zA-Z0-9_-]+)+$",message ="企业邮箱不能为空")
    private String mail;

}
